.\" vim:filetype=groff
.TH pqiv 1 "March 2024" "2.13.2"
.SH NAME
pqiv \- powerful quick image viewer
.\"
.SH SYNOPSIS
\fBpqiv\fR [options] [filename(s)...]
.\"
.SH DESCRIPTION
\fBpqiv\fR is a simple command line image viewer inspired by qiv. It is highly
customizable and supports a variety of formats.
.\"
.SH OPTIONS
.\"
.TP
.BR \-c ", " \-\-transparent\-background
Draw \fBpqiv\fR's window borderless and transparent. In window mode, a mouse
click activates and deactivates window decorations.
.\"
.TP
.BR \-d ", " \-\-slideshow\-interval=\fISECONDS\fR
In slideshow mode (Activated by \fB\-\-slideshow\fR or key \fBs\fR by default),
cycle through images at this rate. Floating point values are supported, e.g.
use 0.5 to move through the images at a rate of two images per second.
.\"
.TP
.BR \-f ", " \-\-fullscreen
Start in fullscreen mode. Fullscreen can be toggled by pressing \fBf\fR at
runtime by default.
.\"
.TP
.BR \-F  ", " \-\-fade
Fade between images. See also \fB\-\-fade\-duration\fR.
.\"
.TP
.BR \-i ", " \-\-hide\-info\-box
Initially hide the info box. Whether the box is visible can be toggled by
pressing \fBi\fR at runtime by default.
.\"
.TP
.BR \-\-font=\fIFONT\fR
Specify the Pango font string for the info box. Note that the font size
will be scaled to the window.
.\"
.TP
.BR \-l ", " \-\-lazy\-load
\fBpqiv\fR normally processes all command line arguments before displaying its
main window. With this option, the window is shown as soon as the first image
has been found and loaded.
.\"
.TP
.BR \-n ", " \-\-sort
Instead of storing images in the order they are given on the command line and
found within directories, sort them. The default order is by name (natural
order). See \fB\-\-sort\-key\fR to change the order.
.\"
.TP
.BR \-P ", " \-\-window\-position=\fIPOSITION\fR
Set the initial window position. \fIPOSITION\fR may either be
.RS
.IP x,y 5
screen coordinates, or
.IP off
to not position the window at all.
.RE
.\"
.TP
.BR \-r ", " \-\-additional\-from\-stdin
Read additional filenames/folders from the standard input. This option
conflicts with \fB\-\-actions\-from\-stdin\fR.
.\"
.TP
.BR \-s ", " \-\-slideshow
Start in slideshow mode. Slideshow mode can be toggled at runtime by pressing
\fBs\fR by default.
.\"
.TP
.BR \-t ", " \-\-scale\-images\-up
Scale images up to fill the whole screen. This can be toggled at runtime by
pressing \fBt\fR by default. See also \fB\-\-disable\-scaling\fR.
.\"
.TP
.BR \-T ", " \-\-window\-title=\fITITLE\fR
Set the title of the window. \fBpqiv\fR substitutes several variables into \fITITLE\fR:
.RS
.IP $BASEFILENAME 15
The base file name of the current file (e.g. `\fIimage.png\fR'),
.IP $FILENAME
The file name of the current file (e.g. `\fI/home/user/image.png\fR'),
.IP $WIDTH
The width of the current image in pixels,
.IP $HEIGHT
The height of the current image in pixels,
.IP $ZOOM
The current zoom level,
.IP $IMAGE_NUMBER
The index of the current image,
.IP $IMAGE_COUNT
The total number of images.
.PP
The default is `pqiv: $FILENAME ($WIDTHx$HEIGHT) $ZOOM% [$IMAGE_NUMBER/$IMAGE_COUNT]'.
.RE
.\"
.TP
.BR \-z ", " \-\-zoom\-level=\fIFLOAT\fR
Set the initial zoom level as a floating point value, i.e., 1.0 is 100%. This
only applies to the first image, other images are scaled according to the scale
mode (see \fB\-\-scale\-images\-up\fR and \fB\-\-disable\-scaling\fR) and
window size.
.\"
.TP
.BR \-1 ", " \-\-command\-1=\fICOMMAND\fR
Bind the external \fICOMMAND\fR to key 1. You can use 2..9 to bind further
commands. The \fBACTIONS\fR feature (see below) allows one to bind further keys to
other commands. \fICOMMAND\fR is executed using the default shell processor.
`$1' is substituted with the current file name. Unless \fICOMMAND\fR begins with
`|' or `-', if `$1' is not present, the file name is appended to the command line.
.RS
.PP
If \fICOMMAND\fR begins with `>', its standard output is displayed in a popup window.
.PP
If \fICOMMAND\fR begins with `|', the current image is piped to its standard
input, and its standard output is loaded as an image. This can be used to e.g.
process images.
.PP
If \fICOMMAND\fR begins with `-', a list of currently marked images is piped to its
standard input.
.RE
.\"
.TP
.BR \-\-action=\fIACTION\fR
Execute a specific \fIACTION\fR when starting \fBpqiv\fR. The syntax is
.RS
.RS
command(parameter); command(parameter);
.RE
See the \fBACTIONS\fR section below for available commands.
.RE
.\"
.TP
.BR \-\-actions\-from\-stdin
Like \fB\-\-action\fR, but read actions from the standard input. See the
\fBACTIONS\fR section below for syntax and available commands. This option
conflicts with \fB\-\-additional\-from\-stdin\fR.
.\"
.TP
.BR \-\-allow\-empty\-window
\fBpqiv\fR normally does not display the main window until one image has been
found, and quits when it cannot load any of the images anymore. With this
option, both situations result in an empty \fBpqiv\fR window being shown.
.\"
.TP
.BR \-\-auto\-montage\-mode
Automatically enter montage mode if \fBpqiv\fR is started with more than one
image.
.\"
.TP
.BR \-\-background\-pattern=\fIPATTERN\fR
\fBpqiv\fR draws a checkerboard as transparent images' background. Use this option
to alternatively use a white or black background. Valid values are \fIcheckerboard\fR,
\fIwhite\fR and \fIblack\fR.
.\"
.TP
.BR \-\-bind\-key=\fIKEY\ BINDING\fR
Rebind a key to an action. The syntax is
.RS
.RS
key sequence { command(parameter); command(parameter); }
.RE
A key sequence may be one or more characters, or special characters supplied as
`<name>', where name is a GDK key specifier or a mouse button (`Mouse-1') or a
scrolling direction (`Mouse-Scroll-1'). If you e.g. use `a<Control>b', then a
user must hit `a' followed by control + `b' to trigger the command. It is possible
to bind `a' and `ab' as well. The action bound to `a' will then be slightly delayed
to allow a user to hit `b'. The semicolon separating commands is optional. See
\fBACTIONS\fR below for available commands.
.PP
If you need to know the name of a key specifier, you can run \fBxev\fR and
press the desired key. The name of the keysym will be printed in parentheses,
preceded by `keysym' and a hexadecimal representation. An alternative is to
run \fBxmodmap \-pk\fR. The command outputs the symbolic names in parentheses.
Or use the list at
\fIhttps://git.gnome.org/browse/gtk+/plain/gdk/gdkkeysyms.h\fR.
.PP
\fBpqiv\fR groups key bindings into different contexts. Currently,
\fImontage\fR mode is the only context other than the default one: In
\fImontage\fR mode, different key bindings are used. To switch the context
while binding key sequences, write
.RS
@MONTAGE { ... }
.RE
and insert the special key bindings within the curly braces.
.RE
.\"
.TP
.BR \-\-box\-colors=\fIFOREGROUND\ COLOR:BACKGROUND\ COLOR\fR
Customize the colors used to draw the info box and montage mode borders. Colors
can be specified either as a comma separated list of RBG-values in the range
from 0 to 255 or as a hexvalue, e.g., #aabbcc. The default value is
\fI#000000:#ffff00\fR.
.\"
.TP
.BR \-\-browse
For each command line argument, additionally load all images from the image's
directory. \fBpqiv\fR will still start at the image that was given as the first
parameter.
.\"
.TP
.BR \-\-disable\-backends=\fILIST\ OF\ BACKENDS\fR
Use this option to selectively disable some of \fBpqiv\fR's backends. You can
supply a comma separated list of backends here. Non-available backends are
silently ignored. Disabling backends you don't want will speed up recursive
loading significantly, especially if you disable the archive backend.
Available backends are:
.RS
.IP archive 14
generic archive file support
.IP archive_cbx
*.cb? comic book archive support
.IP libav
video support, works with ffmpeg as well
.IP gdkpixbuf
images
.IP poppler
PDF
.IP spectre
PS/EPS
.IP wand
ImageMagick, various formats, e.g. PSD
.IP webp
WebP format
.RE
.\"
.TP
.BR \-\-disable\-scaling
Completely disable scaling. This can be toggled at runtime by
pressing \fBt\fR by default. See also \fB\-\-scale\-images\-up\fR.
.\"
.TP
.BR \-\-end\-of\-files\-action=\fIACTION\fR
If all files have been viewed and the next image is to be viewed, either by the
user's request or because a slideshow is active, \fBpqiv\fR by default cycles
and restarts at the first image. This parameter can be used to modify this
behaviour. Valid choices for \fIACTION\fR are:
.RS
.IP quit 20
Quit \fBpqiv\fR,
.IP wait
Wait until a new image becomes available. This only makes sense if used with
e.g. \fB\-\-watch\-directories\fR,
.IP wrap\ (default)
Restart at the first image. In shuffle mode, choose a new random order,
.IP wrap-no-reshuffle
As wrap, but do not reshuffle in random mode.
.RE
.\"
.TP
.BR \-\-enforce\-window\-aspect\-ratio
Tell the window manager to enforce the aspect ratio of the window. If this flag
is set, then a compliant window manager will not allow users to resize
\fBpqiv\fR's window to a different aspect ratio.
This used to be the default behaviour, but window managers tend to have bugs in
the code handling forced aspect ratios. If the flag is not set and the aspect
ratios of the window and image do not match, then the image will be still be
drawn with the correct aspect ratio, with black borders added at the sides.
.\"
.TP
.BR \-\-fade\-duration=\fISECONDS\fR
With \fB\-\-fade\fR, make each fade this long. Floating point values are
accepted, e.g. 0.5 makes each fade take half a second.
.\"
.TP
.BR \-\-low\-memory
Try to keep memory usage to a minimum. \fBpqiv\fR by default e.g. preloads the
next and previous image to speed up navigation and caches scaled images to
speed up redraws. This flag disables such optimizations.
.\"
.TP
.BR \-\-max\-depth=\fILEVELS\fR
For parameters that are directories, \fBpqiv\fR searches recursively for
images. Use this parameter to limit the depth at which \fBpqiv\fR searches.  A
level of 0 disables recursion completely, i.e. if you call pqiv with a
directory as a parameter, it will not search it at all.
.\"
.TP
.BR \-\-negate
Display negatives of images. You can toggle this feature at runtime by pressing
\fIn\fR.
.\"
.TP
.BR \-\-shuffle
Display files in random order. This option conflicts with \fB\-\-sort\fR. Files
are reshuffled after all images have been shown, but within one cycle, the
order is stable. The reshuffling can be disabled using
\fB\-\-end\-of\-files\-action\fR. At runtime, you can use \fBControl + R\fR by
default to toggle shuffle mode; this retains the shuffled order, i.e., you can
disable shuffle mode, view a few images, then enable it again and continue
after the last image you viewed earlier in shuffle mode.
.\"
.TP
.BR \-\-show\-bindings
Display the keyboard and mouse bindings and exit. This displays the key
bindings in the format accepted by \fB\-\-bind\-key\fR. See there, and the
\fBACTIONS\fR section for details on available actions.
.\"
.TP
.BR \-\-sort\-key=\fIPROPERTY\fR
Key to use for sorting. Supported values for \fIPROPERTY\fR are:
.RS
.IP name 8
To sort by filename in natural order, e.g. \fIabc32d\fR before \fIabc112d\fR,
but \fIb1\fR after both,
.IP mtime
To sort by file modification date.
.RE
.\"
.TP
.BR \-\-thumbnail\-size=\fIWIDTHxHEIGHT\fR
Adjust the size of thumbnails in \fImontage\fR mode. The default is 128x128.
.\"
.TP
.BR \-\-thumbnail\-preload=\fICOUNT\fR
Preload \fICOUNT\fR thumbnails adjacent to the current image while displaying
images or having them selected in montage mode. This can be used to speed up
montage mode, but will lead to high CPU loads.
.\"
.TP
.BR \-\-thumbnail\-persistence=\fIDIRECTORY/STATUS\fR
Persist thumbnails to disk. The simplest way to use this option is to supply
a value of \fIyes\fR. Thumbnails are then stored according to the Thumbnail
Managing Standard, in \fI$XDG_CACHE_HOME/thumbnails/*\fR. The standard allows
storage of thumbnails in sizes 128x128, 256x256, 512x512 and 1024x1024 exclusively, and does not
specify how to store thumbnails for files in archives or multi-page documents.
Thumbnails violating those constraints will be stored in a special \fIx-pqiv\fR
subfolder. Supply \fIstandard\fR to store standard compliant thumbnails only.
If this option is not used, then thumbnails will not be loaded from the cache
either \- any thumbnails will be regenerated each time \fImontage\fR mode is used.
A value of \fIread-only\fR can be used to load thumbnails, but never store them.
\fIread-only\fR is the default.
.PP
.RS
If you supply \fIlocal\fR as the argument value, \fBpqiv\fR will store thumbnails
in a subfolder named \fI.sh_thumbnails\fR relative to the images as specified
by the Thumbnail Managing Standard. Your third option is to provide the name of
a directory. \fBpqiv\fR will then use that directory to store thumbnails to.
The folder must be given as an absolute path, relative paths do not work.
Note that any folder not named \fI.sh_thumbnails\fR will be considered in
\fB\-\-watch\-directories\fR. Also, note that while \fBpqiv\fR will store
thumbnails to another folder, it will still attempt to load them from the
standard folders as well.
.RE
.\"
.TP
.BR \-\-recreate\-window
Workaround for window managers that do not handle resize requests correctly:
Instead of resizing, recreate the window whenever the image is changed. This
does not redraw images upon changes in zoom alone.
.\"
.TP
.BR \-\-scale\-mode\-screen\-fraction=\fIFRACTION\fR
Adjust how much screen space \fBpqiv\fR uses when auto-scaling images outside
fullscreen mode. Defaults to 0.8 (80%).
.\"
.TP
.BR \-\-wait\-for\-images\-to\-appear
If no images are found in the directories specified on the command line,
instead of exiting, wait for some to appear. This option only works in
conjunction with \fB\-\-lazy\-load\fR and \fB\-\-watch\-directories\fR.
.\"
.TP
.BR \-\-watch\-directories
Watch all directories supplied as parameters to \fBpqiv\fR for new files and
add them as they appear. In \fB\-\-sort\fR mode, files are sorted into the
correct position, else, they are appended to the end of the list.
See also \fB\-\-watch\-files\fR, which handles how changes to the image that is
currently being viewed are handled.
.\"
.TP
.BR \-\-watch\-files=\fIVALUE\fR
Watch files for changes on disk. Valid choices for \fIVALUE\fR are:
.RS
.IP "on (default)" 15
Watch files for changes, reload upon a change, and skip to the next file if a file is removed,
.IP changes-only
Watch files for changes, reload upon a change, but do nothing if a file is removed,
.IP off
Do not watch files for changes at all.
.PP
Note that a file that has been removed will still be removed from \fBpqiv\fR's
image list when it has been unloaded, i.e. if a user moves more than one image
away from it. (See also \fB\-\-low\-memory\fR.)
.RE
.\"
.\"
.SH ACTIONS
Actions are the building blocks for controlling \fBpqiv\fR. The syntax for
entering an action is
.RS
\fICOMMAND\fR(\fIPARAMETER\fR)
.RE
where \fICOMMAND\fR is one of the commands described in the following and
\fIPARAMETER\fR is the command's parameter. Strings are not quoted. Instead,
the closing parenthesis must be escaped by a backslash if it is used in a
string. E.g., `command(echo \\))' will output a single `)'. The available
commands are:
.TP
.BR add_file(STRING)
Add a file or directory.
.TP
.BR animation_step(INT)
Stop an animation, and advance by the given number of frames plus one.
.TP
.BR animation_continue()
Continue a stopped animation.
.TP
.BR animation_set_speed_relative(DOUBLE)
Scale the animation's display speed.
.TP
.BR animation_set_speed_absolute(DOUBLE)
Set the animation's display speed scale level to an absolute value. 1.0 is the
animation's natural speed.
.TP
.BR bind_key(STRING)
Override a key binding. Remember to quote closing parenthesis inside the new
definition by prepending a backslash. Useful in conjunction with
\fBsend_keys(STRING)\fR to set up cyclic bindings.
.TP
.BR clear_marks()
Clear all marks.
.TP
.BR command(STRING)
Execute the given shell command. The syntax of the argument is the same as for
the \fB\-\-command\-1\fR option.
.TP
.BR flip_horizontally()
Flip the current image horizontally.
.TP
.BR flip_vertically()
Flip the current image vertically.
.TP
.BR goto_directory_relative(INT)
Jump to the \fIn\fR'th next or previous directory.
.TP
.BR goto_earlier_file()
Return to the image that was opened before the current one.
.TP
.BR goto_file_byindex(INT)
Jump to a file given by its number.
.TP
.BR goto_file_byname(STRING)
Jump to a file given by its displayed name.
.TP
.BR goto_file_relative(INT)
Jump to the \fIn\fR'th next or previous file.
.TP
.BR goto_logical_directory_relative(INT)
Jump to the \fIn\fR'th next or previous logical directory. Any multi-page
documents, such as PDFs or archive files, are regarded as logical directories.
Directories within archive files, recognizable by a slash in the archive
member's file name, are regarded as directories too. Basically, the rule is
that two images are in the same logical directory if no character following
the common prefix of their file names in either name is a slash or a hash
symbol.
.TP
.BR hardlink_current_image()
Hardlink the current image to \fI./.pqiv-select/\fR, or copy it if hardlinking
is not possible.
.TP
.BR jump_dialog()
Display the jump dialog.
.TP
.BR montage_mode_enter()
Enter montage mode, a view for interactive selection of images.
.TP
.BR montage_mode_follow(KEYS)
Set up "follow" mode: Bind a sequence composed of the keys in KEYS to each
visible thumbnail, such that typing that sequence moves the cursor to said
position. At the same time, turn on binding overlays, increase the keyboard
timeout, and revert everything after an image has been selected.
.TP
.BR montage_mode_return_proceed()
Leave montage mode, and goto the currently selected image.
.TP
.BR montage_mode_return_cancel()
Leave montage mode, and return to the last image viewed before entering montage
mode.
.TP
.BR montage_mode_set_shift_x(INT)
Set the horizontal cursor position in montage mode to an absolute value, indexed from 0.
.TP
.BR montage_mode_set_shift_y(INT)
Set the vertical cursor position in montage mode to an absolute value, indexed from 0.
.TP
.BR montage_mode_set_wrap_mode(INT)
Adjust how wrapping around edges works when shifting the cursor position in montage mode:
The default, \fI1\fR, is to wrap around rows but not around the whole image list. Set
this to \fI0\fR to disable wrapping entirely. A value of \fI2\fR enables full wrapping.
.TP
.BR montage_mode_shift_x(INT)
Shift the cursor in montage mode in horizontal direction. Shifts wrap around
edges to the adjacent vertical lines, but not around the end of the list back
to its beginning.
.TP
.BR montage_mode_shift_y(INT)
Shift the cursor in montage mode in vertical direction.
.TP
.BR montage_mode_show_binding_overlays(INT)
Disable (by using a parameter value of 0) or enable (by using any other value)
follow mode. In follow mode, \fBpqiv\fR will draw mnemonics on top of each
thumbnail that is reachable by typing a key (combination). Use this to realize
keyboard navigation similar to vimperator/pentadactyl/vimium/etc.
.TP
.BR montage_mode_shift_y_pg(INT)
Shift the cursor in montage mode in vertical direction by \fIn\fR pages.
.TP
.BR move_window(INT,\ INT)
Move \fBpqiv\fR's window to the specified coordinates. Negative values center
the window on the current monitor.
.TP
.BR nop()
Do nothing. Can be used to clear an existing binding.
.TP
.BR numeric_command(INT)
Execute the \fIn\fR'th command defined via \fB\-\-command\-1\fR etc.
.TP
.BR output_file_list()
Output a list of all loaded files to the standard output.
.TP
.BR quit()
Quit pqiv.
.TP
.BR reload()
Reload the current image from disk.
.TP
.BR remove_file_byindex(INT)
Remove a file given by its number.
.TP
.BR remove_file_byname(STRING)
Remove a file given by its displayed name.
.TP
.BR reset_scale_level()
Reset the scale level to the default value.
.TP
.BR rotate_left()
Rotate the current image left by 90°.
.TP
.BR rotate_right()
Rotate the current image right by 90°.
.TP
.BR send_keys(STRING)
Emulate pressing a sequence of keys. This action currently does not support
special keys that do not have an ASCII representation. Useful in conjunction
with \fBbind_key(STRING)\fR to set up cyclic key bindings.
.TP
.BR set_cursor_visibility(INT)
Set the visibility of the cursor; 0 disables, other values enable visibility.
.TP
.BR set_cursor_auto_hide(INT)
Automatically show the cursor when the pointer moves, and hide it after one
second of inactivity. Set to 0 to disable this feature or any other value to
enable it. Note that this enables pointer movement events, which might slow
down pqiv if it is used over slow network links.
.TP
.BR set_fade_duration(DOUBLE)
Set the duration of fades between images. In contrast to the command line
option, this action also implicitly enables fading. Set the duration to zero to
disable the feature.
.TP
.BR set_interpolation_quality(INT)
Set the interpolation quality for resized images. Options are: 0 to cycle
between the different modes, 1 for an automated choice based on the image size
(small images use nearest interpolation, large ones Cairo's `good' mode), 2 for
`fast', 3 for `good' and 4 for `best'.
.TP
.BR set_keyboard_timeout(DOUBLE)
Set the timeout for key sequence input. For example, if you bind something to \fIa\fI
and another action to \fIab\fR, \fBpqiv\fR will give you by default half a second to
enter the \fIb\fR before assuming that you intended to type only \fIa\fR. Use this
action to change this value.
.TP
.BR set_scale_level_absolute(DOUBLE)
Set the scale level to the parameter value. 1.0 is 100%. See also
\fB\-\-zoom\-level\fR.
.TP
.BR set_scale_level_relative(DOUBLE)
Adjust the scale level multiplicatively by the parameter value.
.TP
.BR set_scale_mode_fit_px(INT,\ INT)
Always adjust the scale level such that each image fits the given dimensions.
.TP
.BR set_scale_mode_screen_fraction(DOUBLE)
Adjust how much of the available screen space is used for scaling the window
outside fullscreen mode. Defaults to 0.8. This also affects the size of the
\fImontage\fR mode window.
.TP
.BR set_shift_align_corner(STRING)
Align the image to the window/screen border. Possible parameter values are the
cardinal directions, e.g. \fINE\fR will align the image to the north east, i.e. \
top right, corner. You can prepend the parameter by an additional \fIC\fR to
perform the adjustment only if the image dimensions exceed the available space,
and to center the image elsewise.
.TP
.BR set_shift_x(INT)
Set the shift in horizontal direction to a fixed value.
.TP
.BR set_shift_y(INT)
Set the shift in vertical direction to a fixed value.
.TP
.BR set_slideshow_interval_absolute(DOUBLE)
Set the slideshow interval to the parameter value, in seconds.
.TP
.BR set_slideshow_interval_relative(DOUBLE)
Adjust the slideshow interval additively by the parameter value. See also
\fB\-\-slideshow\-interval\fR.
.TP
.BR set_status_output(INT)
Set this to non-zero to make pqiv print status information for scripts to
stdout, once upon activation and then whenever the user moves between images.
The format is compatible with shell variable definitions. Variables currently
implemented are \fICURRENT_FILE_NAME\fR and \fICURRENT_FILE_INDEX\fR. An
output sweep always ends with an empty line.
.TP
.BR set_thumbnail_preload(INT)
Change the amount of thumbnails to be preloaded. A value of zero disables
the feature.
.TP
.BR set_thumbnail_size(INT, INT)
Change the size of thumbnails. The order of the arguments is width, then
height. Thumbnails are always scaled such that no side is larger than this
limit.
.TP
.BR shift_x(INT)
Shift the current image in x direction.
.TP
.BR shift_y(INT)
Shift the current image in y direction.
.TP
.BR toggle_background_pattern(INT)
Toggle between the different background patterns: 0 to toggle, 1 for
checkerboard pattern, 2 for black, 3 for white.
.TP
.BR toggle_fullscreen(INT)
Toggle fullscreen mode: 0 to toggle, 1 to go to fullscreen, 2 to return to
window mode.
.TP
.BR toggle_info_box()
Toggle the visibility of the info box.
.TP
.BR toggle_mark()
Toggle the current image's mark.
.TP
.BR toggle_negate_mode(INT)
Toggle negate (color inversion) mode: 0 to toggle, 1 to enable, 2 to disable.
.TP
.BR toggle_scale_mode(INT)
Change the scale mode: Use 1 to disable scaling, 2 for automated scaledown
(default), 3 to always scale images up, 4 to maintain the user-set zoom
level, and 5 to maintain the window's size.
0 cycles through modes 1\-3.
.TP
.BR toggle_shuffle_mode(INT)
Toggle shuffle mode. Use 0 to cycle through the possible values, 1 to enable shuffle, and any other value to disable it.
.TP
.BR toggle_slideshow()
Toggle slideshow mode.
.\"
.SH DEFAULT KEY BINDINGS
.IP Backspace/Space 25
Previous/Next file.
.IP ctrl-a
Link the current image to \fI./.pqiv-select/\fR, or copy it if hardlinking is not possible.
.IP f
Toggle fullscreen mode.
.IP h/v
Flip the image horizontally or vertically.
.IP k/l
Rotate the image right or left.
.IP i
Toggle visibility of the info box.
.IP j
Show a dialog with a list of all files for quick selection.
.IP m
Toggle \fImontage\fR mode, an interactive image selection mode. Use cursor keys
or your mouse to select an image and Return to return to single image view. Use
\fIg\fR to quickly navigate to a thumbnail.
.IP o
Toggle a mark on an image. Use \fIctrl-R\fR to reset all marks. Used in conjunction
with commands starting with a \fI-\fR.
.IP q
Quit \fBpqiv\fR
.IP r
Reload the current image.
.IP s
Toggle slideshow mode.
.IP t
Toggle the scale mode; cycle between scaling all images up, scaling large images down and no scaling at all.
.IP ctrl-t
Maintain user-set scale level.
.IP mod-t
Maintain the window's size.
.IP Plus/Minus
Zoom.
.IP "Period, ctrl-Period"
Stop, single-step and continue animated images.
.IP "mod-Plus, mod-Minus"
Alter animation speed.
.IP ctrl-r
Toggle shuffle mode.
.IP ctrl-p
Go to the image viewed before the current one.
.IP "ctrl-Space, ctrl-Backspace"
Go to the next/previous logical directory.
.IP "ctrl-Plus, ctrl-Minus"
Alter slideshow interval.
.IP b
Toggle background pattern for transparent images.
.IP n
Toggle negate ("negative") mode.
.IP "Mouse buttons (fullscreen)"
Goto the next and previous files.
.IP "Mouse drag (fullscreen)"
Move the image.
.IP "Mouse drag with right button (fullscreen)"
Zoom.
.IP "Arrow keys"
Move the image.
.PP
This list omitted some advanced default bindings. The descriptions of the
actions above is annotated with those bindings. You can also run `\fBpqiv
\-\-show\-bindings\fR' to display a complete list.
.\"
.SH CONFIGURATION FILE
Upon startup, \fBpqiv\fR parses the file \fI~/.config/pqivrc\fR. It should be a
INI-style key/value file with an \fIoptions\fR section. All long form
parameters are valid keys. To set a boolean flag, set the value to 1. A set
flag inverts the meaning of the associated parameter. E.g., if you set
`\fIfullscreen=1\fR', then \fBpqiv\fR will start in fullscreen mode unless you supply
\fB\-f\fR upon startup.
.PP
As an example,
.RS
.nf
[options]
fullscreen=1
sort=1
command-1=|convert - -blur 20 -
.fi
.RE
will make \fBpqiv\fR start in fullscreen by default, sort the file list and
bind a blur filter to key \fB1\fR. The \fB\-f\fR flag on the command line will
make \fBpqiv\fR not start in fullscreen, and \fB\-n\fR will make it not sort
the list.
.PP
You can place key bindings in the format of the \fB\-\-bind\-key\fR
parameter in a special \fI[keybindings]\fR section. E.g.,
.RS
.nf
[keybindings]
q { goto_file_relative(-1); }
w { goto_file_relative(1); }

x { send_keys(#1); }
<numbersign>1 { set_scale_level_absolute(1.); bind_key(x { send_keys(#2\\); }); }
<numbersign>2 { set_scale_level_absolute(.5); bind_key(x { send_keys(#3\\); }); }
<numbersign>3 { set_scale_level_absolute(0.25); bind_key(x { send_keys(#1\\); }); }
.fi
.RE
will remap \fIq\fR and \fIw\fR to move between images, and set up \fIx\fR to
cycle through 100%, 50% and 25% zoom levels.
.PP
Similarly, you can also specify (multiple) actions to be executed each time
\fBpqiv\fR is started in a section called \fI[actions]\fR.
.PP
For backwards compatibility with old versions of \fBpqiv\fR, if the file does
not start with a section definition, the first line will be parsed as command
line parameters.
.PP
You may place comments into the file by beginning a line with `;' or `#'.
Comments at the end of a line are not supported.
.PP
Other supported paths for the configuration file are \fI~/.pqivrc\fR,
\fI/etc/xdg/pqivrc\fR and \fI/etc/pqivrc\fR. \fBpqiv\fR will use whichever
file it finds first. You can use the environment variable \fIPQIVRC_PATH\fR to
override the configuration file.
.SH EXAMPLES
.\"
.TP
\fBpqiv \-\-bind\-key="a { goto_file_byindex(0) }" \-\-bind\-key='c { command(echo -n $1 | xclip) }' \-\-sort foo bar.pdf\fR
Rebinds \fBa\fR to go back to the first image, \fBc\fR to store the path to the
current image to the clipboard using \fIxclip\fR and loads all files from the
\fIfoo\fR folder and \fIbar.pdf\fR, sorted.
.TP
\fBpqiv \-\-slideshow \-\-watch\-directories \-\-end\-of\-files\-action=wait \-\-slideshow\-interval=0.001 test\fR
Load all files from the \fItest\fR folder in a slideshow progressing very fast,
and in the end wait until new files become available. This effectively displays
new images as they appear in a directory and is useful e.g. if you output images
from a script that you later intent to combine into a movie and wish to monitor
progress.
.TP
\fBpqiv \-\-slideshow \-\-allow\-empty\-window \-\-watch\-directories \-\-wait\-for\-images\-to\-appear \-\-lazy\-load test\fR
Set up a slideshow that displays all images from the \fItest\fR folder such
that it is possible to remove all images from the directory and place new ones
into it afterwards without \fBpqiv\fR exiting.
.TP
\fBecho "output_file_list(); quit()" | pqiv \-\-actions\-from\-stdin test\fR
Output a list of all files from the \fItest\fR folder that \fBpqiv\fR can
handle and quit.
.\"
.SH BUGS
Please report any bugs on github, on https://github.com/phillipberndt/pqiv
.\"
.SH AUTHOR
Phillip Berndt (phillip dot berndt at googlemail dot com)
